#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#define DATABASE_FILE_PATH ("/home/user/mystudy/study/HospitalManagement/HospitalManagement.db")
#include <QMainWindow>
#include <QTcpServer>
#include <QTcpSocket>
#include<QLabel>
#include <QSqlDatabase>
#include <QSqlQuery>
#include<QSqlError>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

void storeDataInDatabase(const QByteArray &data);

void displayDatabaseContents();

private slots:
    void on_setlisten_clicked();

    void on_sendMsg_clicked();

    void on_pushButton_clicked();

private:
    Ui::MainWindow *ui;
    QTcpServer *m_s;
    QTcpSocket *m_tcp;
    QLabel *m_status;
    QSqlDatabase db;
};

#endif // MAINWINDOW_H
